<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>检验结果</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <link rel="stylesheet" href="/lobsteruiframe/weui/css/weui.css" />
    <link rel="stylesheet" href="/lobsteruiframe/weui/css/weuix.css" />
    <script src="/lobsteruiframe/weui/js/zepto.min.js"></script>
    <script src="/lobsteruiframe/weui/js/zepto.weui.js"></script>
    <script src="/lobsteruiframe/weui/js/swipe.js"></script>
    <script src="/lobsteruiframe/weui/js/macy.js"></script>
    <script src="/jslib/lobster.js"></script>
    <script src="/jslib/template-web.js"></script>

    <style>
        .dangerous {
            color: #FA5151;
        }
    </style>
</head>

<body ontouchstart>
    <div class="">
        <div id="div_title">

        </div>
        <div id="div_content" style="padding:10px;font-size:12px;">

        </div>
    </div>
</body>

</html>

<script>
    lobsterh5.main( {
        data:{},
        pageload(){
            this.initdata();
        },
        initdata(){
            var self = this;
            var data = JSON.parse( localStorage.getItem("lisitemdata"));
            self.inittemp("tplresult", "div_content", { list: data.Results });
            self.inittemp("tpltitle","div_title", data );
        },
        inittemp(tempid, _id, data) {
            var html = template(tempid, data);
            $("#" + _id).html(html);
        },
    },true); 

</script>

<script type="text/template" id="tpltitle">
    <div class="f16 page-hd-title" style="display: flex; justify-content: center;align-items: center;margin-top: 20px; margin-bottom: 20px;">
            {{ExamItemName}}
    </div>
    <div class="weui-flex">
        <div class="weui-flex__item page-hd-desc" style="padding-left:10px">
            申请医生:{{ApplyDoc}}
        </div>
        
    </div>
    <div class="weui-flex">

        <div class="weui-flex__item page-hd-desc" style="padding-left:10px;">
            申请时间:{{ApplyTime}}
        </div>
    </div>
</script>

<script type="text/template" id="tplresult">
    <table>
        <thead>
        <tr><th>项目名称</th><th>结果</th><th>参考范围</th></tr>
        </thead>
        <tbody >
        {{each list}}
        <tr>
            <td title="项目名称">{{$value.ItemName}}</td>
            <td title="结果">
                <div class="{{$value.Dangerous?'dangerous':''}}">
                    {{$value.Value }}  
                    {{$value.Unit}} 
                    {{if($value.Dangerous)}}
                        {{$value.Dangerous}}
                    {{/if}}
                </div>	
               
            </td>
            <td title="参考范围">{{$value.RefValue}}</td>
        </tr>
       {{/each}} 
    </tbody>
    </table>
</script>

